package com.qye.filejdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JDBC {
	static{
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
		
	public static Connection getc(){
	
		String u = "jdbc:mysql://localhost:3306/qys?useUnicode=true&characterEncoding=UTF-8";
		String n = "root";
		String p = "5201314";
		Connection c = null;
		try {
			c = DriverManager.getConnection(u, n, p);
			
		} catch (SQLException e) {
			e.printStackTrace();
		}
		 return c;
	}
}